package com.xrtn.service;

import com.xrtn.bean.*;
import com.xrtn.utils.ResponseData;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by tu_pei on 2018/2/26.
 */
public interface IDoctorService {
    /**
     * 登录接口
     * @param account
     * @param userPwd
     * @return
     */
    Map<String,Object> sign(String account, String userPwd);

    /**
     * 首页接口
     * @param userId
     * @param bookingDate
     * @return
     */
    Map<String,Object> desktop(Integer userId,String bookingDate);
    /**
     * 获取最新版本
     * @return
     */
    SysVersionInfo existNewVersion(SysVersionInfo versionInfo);

    /**
     * 根据患者id查询患者诊疗进度
     * @param userId
     * @return
     */
    Map<String,Object> selectTherapySchedule(Integer userId,Integer bookingId);

    /**
     * 根据患者id查询患者诊疗进度状态
     * @param userId
     * @return
     */
    Map<String,Object> selectTherapyScheduleState(Integer userId,Integer bookingId);

    /**
     * 查询患者病历详情
     * @param bookingId    预约ID
     * @param patientId    患者id
     * @return
     */
    ResponseData selectTreatmentInfo(Integer bookingId, Integer patientId);
    /**
     * 查询患者病历详情
     * @param treatmentId    病历id
     * @return
     */
    ResponseData selectSysTreatmentInfo(Integer patientId,Integer treatmentId, Integer isOld, Integer bookingId);

    /**
     * 获取患者历史病历列表
     * @param patientId
     * @return
     */
    ResponseData selectHistoryTreatmentList(Integer patientId, ResponseData data);
    /**
     * 保存患者病历详情
     * @return
     */
    Integer saveTreatmentInfo(TPatientTreatment patientTreatment ,String bookingName,String bookingPhone,String bookingPhones,
                              Integer doctorId ,Integer subclinicId, String pointArray, String diseaseArray, String conclusionArray,
                              String infoIds, Integer specialId, Integer checkResult, Integer realResult, Integer error);

    /**
     * 修改
     * @param patientTreatment
     * @param pointArray
     * @param diseaseArray
     * @return
     */
    Integer updateTreatmentInfo(TPatientTreatment patientTreatment , String pointArray, String diseaseArray, String conclusionArray,
                                String infoIds, Integer specialId, Integer checkResult, Integer realResult, Integer error);
    /**
     * 提交订单
     * @return
     */
    Integer saveOrderInfo(TOrderInfo orderInfo, String goodsList, String serviceList);
    /**
     * 修改订单商品明细
     * @return
     */
    Integer updateOrderDetail(TOrderInfo orderInfo, String goodsList, String serviceList);
    /**
     * 查询订单
     * @return
     */
    Map<String,Object> selectOrderInfo(Integer bookingId,Integer patientId);
    /**
     * 查询订单详情
     * @return
     */
    ResponseData selectOrderDetail(Integer bookingId,Integer patientId,Integer orderId,ResponseData data);
    /**
     * 修改订单状态
     * @param bookingId
     * @param patientId
     * @return
     */
    Integer updateOrderInfo(Integer bookingId, Integer patientId, Integer orderStatus);

    /**
     * 查询大夫信息
     * 展示大夫个人信息 ，级别，距离下级
     * @param doctorId
     * @return
     */
    Map<String,Object> selectUserInfo(Integer doctorId,ResponseData data);

    /**
     * 查询大夫提成明细
     * @return
     */
    Map<String,Object> selectUserSaleList(Integer doctorId);
    /**
     * 查询可休息的日期`
     * @return
     */
    List<Map<String, Object>> selectDoctorRest(Integer doctorId, String offDay);
    /**
     * 统计接口
     * @return
     */
    ResponseData selectStatistics(Integer doctorId, String monthStr, ResponseData data);
    /**
     * 查询医师订单列表
     * @return
     */
    List<TOrderInfo> selectDoctorOrderList(Integer doctorId);
    /**
     * 修改密码
     * @return
     */
    int updateUserPwd(Map<String, Object> params);

    /**
     * 修改预约状态
     * @param bookingId
     * @return
     */
    Integer updateBookingState(Integer bookingId);

    /**
     * 修改病历信息
     * @param params
     * @return
     */
    Integer updateByTreatmentId(HashMap<String,Object> params);

    /**
     * 修改订单商品支付方式
     * @return
     */
    Integer updateOrderInfoByPayFlag(Integer payWay, Integer payWays, Integer orderId);

    /**
     * 修改卡项订单支付方式
     * @param payWay
     * @param orderId
     * @return
     */
    Integer updateAccountUserInfoByPayFlag(Integer payWay, Integer orderId);
}
